<?php
$albums = getAlbums();
?>
<div itemscope itemtype="" id="crumbs"> <a class="crumbs-home" itemprop="breadcrumb" href="/">Home</a> » <span class="current">Thư viện hình ảnh</span></div>
<div class="content"><script>
jQuery(window).load(function() {
  jQuery('#flexslider').flexslider({
    animation: "fade",	slideshowSpeed: 7000,
	animationSpeed: 600,
	randomize: false,
	pauseOnHover: true,
	start: function(slider) {
       		var slide_control_width = 100/5;
    		jQuery('.flex-control-nav li').css('width', slide_control_width+'%');
      	}
  });
});
</script>

<section class="cat-box scroll-box"></section>
		
<?php
foreach ($albums as $entry) {
?>    
<section class="cat-box recent-box">	
	<div class="cat-box-title">
    	<h2><a href="#"><?php echo($entry[1]); ?></a></h2>
        <div class="stripe-line"></div>
    </div><!-- post-thumbnail /-->
    <div class="cat-box-content">
    <?php
	$albumDetails = getAlbumDetails($entry[0]);
	foreach ($albumDetails as $albumDetail) {
	?>
    	<div class="recent-item">
        	<div class="post-thumbnail">
            	<img width="200" height="133" src="<?php echo($albumDetail[4]); ?>" class="attachment-272x125" alt="<?php echo($albumDetail[3]); ?>" title="<?php echo($albumDetail[3]); ?>" />
                <span class="overlay-icon"></span>
			</div><!-- post-thumbnail /-->
			<h3 class="post-box-title"><?php echo($albumDetail[3]); ?></h3>
			<p class="post-meta"><span><?php echo(int_to_date($albumDetail[5])); ?></span></p>
		</div>
    <?php
	}
	?>    
		<div class="clear"></div>

	</div><!-- .cat-box-content /-->
</section>
<?php
}
?>
				


<script type="text/javascript">
	jQuery(document).ready(function() {
		var vids = jQuery("#slideshow1 .scroll-item");
		for(var i = 0; i < vids.length; i+=4) {
		  vids.slice(i, i+4).wrapAll('<div class="group_items"></div>');
		}
		jQuery(function() {
			jQuery('#slideshow1').cycle({
				fx:     'scrollHorz',
				timeout: 3000,
				pager:  '#nav1',
				slideExpr: '.group_items',
				speed: 300,
				pause: true
			});
		});
  });
</script>
	

			
	  <section class="cat-box list-box"><!-- post-thumbnail /--><!-- .cat-box-content /-->
	  </section><!-- List Box -->

		
	
	<!-- #cats-tabs-box /-->
</div>